package br.com.absolutech.study.chapter9.test02;

public class Letters extends Thread {

	private String name;

	public Letters(String name) {
		this.name = name;
	}

	public void write() {
		System.out.print(name);
		System.out.print(name);
	}

	public static void main(String[] args) {
		new Letters("X").start();
		new Letters("Y").start();
	}

	//letra F
	public void run() {
		synchronized (System.out) {
			write();
		}
	}
}
